package com.ytz.controller;

import com.ytz.config.WxPayConfig;
import com.ytz.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private WxPayConfig wxPayConfig;

    @GetMapping("/test")
    public BaseResult test(){
        return BaseResult.ok("hello payment");
    }

//测试微信配置文件
    @GetMapping("/getWxConfig")
    public BaseResult getWxConfig(){
        return  BaseResult.ok(wxPayConfig.getMchId());
    }
}
